﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Texture, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.LayeredRegion, "ScriptType"))

	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Texture, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.LayeredRegion, "Function"))

	_DB:AddCodeHelp("GetTexCoord", [=[Returns corner coordinates for scaling or cropping the texture image]=], [=[GetTexCoord()]=])
	_DB:AddCodeHelp("GetTexCoordModifiesRect", [=[Sets whether modifying texture coordinates scales or crops the texture image]=], [=[GetTexCoordModifiesRect()]=])
	_DB:AddCodeHelp("GetTexture", [=[Returns the path to the texture's image file]=], [=[GetTexture()]=])
	_DB:AddCodeHelp("SetTexCoord", [=[Sets corner coordinates for scaling or cropping the texture image]=], [=[SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy)]=])
	_DB:AddCodeHelp("SetDesaturated", [=[Sets whether the texture image should be displayed with zero saturation (i.e. converted to grayscale)]=], [=[SetDesaturated(desaturate)]=])
	_DB:AddCodeHelp("GetBlendMode", [=[Returns the blend mode of the texture]=], [=[GetBlendMode()]=])
	_DB:AddCodeHelp("SetGradientAlpha", [=[Sets a gradient color shading for the texture (including opacity in the gradient)]=], [=[SetGradientAlpha("orientation", startR, startG, startB, startAlpha, endR, endG, endB, endAlpha)]=])
	_DB:AddCodeHelp("SetBlendMode", [=[Sets the blend mode of the texture]=], [=[SetBlendMode("mode")]=])
	_DB:AddCodeHelp("SetTexture", [=[Sets the texture object's image or color]=], [=[SetTexture(red, green, blue [, alpha])]=])
	_DB:AddCodeHelp("SetPortraitToTexture", [=[Sets the texture to be displayed from a file applying circular opacity mask making it look round like portraits.]=], [=[SetPortraitToTexture(filePath)]=])
	_DB:AddCodeHelp("SetTexCoordModifiesRect", [=[Sets whether modifying texture coordinates scales or crops the texture image]=], [=[SetTexCoordModifiesRect(modifiesRect)]=])
	_DB:AddCodeHelp("GetAnimationGroups", [=[Returns a list of animation groups belonging to the region]=], [=[GetAnimationGroups()]=])
	_DB:AddCodeHelp("SetParent", [=[Sets the parent for the animation]=], [=[SetParent("animGroupName")]=])
	_DB:AddCodeHelp("SetPortraitTexture", [=[Paint a Texture object with the specified unit's portrait.]=], [=[SetPortraitTexture(unit)]=])
	_DB:AddCodeHelp("CanChangeProtectedState", [=[Returns whether protected properties of the region can be changed by non-secure scripts]=], [=[CanChangeProtectedState()]=])
	_DB:AddCodeHelp("SetRotation", [=[Sets the model's current rotation by animating the model]=], [=[SetRotation(facing)]=])
	_DB:AddCodeHelp("SetGradient", [=[Sets a gradient color shading for the texture]=], [=[SetGradient("orientation", startR, startG, startB, endR, endG, endB)]=])
	_DB:AddCodeHelp("IsDesaturated", [=[Returns whether the texture image should be displayed with zero saturation (i.e. converted to grayscale)]=], [=[IsDesaturated()]=])
	_DB:AddCodeHelp("GetVertexColor", [=[Returns the shading color of the texture]=], [=[GetVertexColor()]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Texture, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.LayeredRegion, "Property"))

	_DB:AddCodeHelp("Desaturated", [[whether the texture image should be displayed with zero saturation (i.e. converted to grayscale)]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("VertexColor", [[the color shading for the region's graphics]], IGAS:GetPropertyType("Color"))
	_DB:AddCodeHelp("BlendMode", [[the blend mode of the texture]], IGAS:GetPropertyType("AlphaMode"))
	_DB:AddCodeHelp("TexturePath", [[the texture object's image file path]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("PortraitUnit", [[the unit be de displayed as a portrait, such as "player", "target"]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("PortraitTexture", [[the texture to be displayed from a file applying circular opacity mask making it look round like portraits.]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("Color", [[the texture's color]], IGAS:GetPropertyType("Color"))
end
